package com.yochi.pictureseditor.effects.effectsimpl;

import com.yochi.pictureseditor.effects.EffectEnum;
import com.yochi.pictureseditor.effects.EffectSequential;
import com.yochi.pictureseditor.effects.filters.FilterEnum;
import com.yochi.pictureseditor.exceptions.NullImageException;
import com.yochi.pictureseditor.factories.EffectFactory;
import com.yochi.pictureseditor.images.Image;

public class EffectShadow extends EffectSequential {

	private EffectFactory effectFactory;
	
	  /////////////////
	 // CONSTRUCTOR //
	/////////////////
	
	public EffectShadow(Image img) {
		super(img);
		effectFactory = new EffectFactory();
	}
	
	  ////////////
	 // PUBLIC //
	////////////
	
	public Image apply() throws NullImageException {
		super.addEffect(effectFactory.buildEffect(FilterEnum.SHINE, getImage()));
		super.addEffect(effectFactory.buildEffect(EffectEnum.BLACKANDWHITE, getImage()));
		super.addEffect(effectFactory.buildEffect(FilterEnum.SUREX, getImage()));
		super.addEffect(effectFactory.buildEffect(EffectEnum.REVERSECOLOR, getImage()));
		return super.apply();
	}

}
